<?php

namespace App\Models;

use App\Enums\MiniAPP\AssistantReserveStatus;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;

class FakeAssistantReserve extends Model
{
    use HasFactory ,SoftDeletes;

    protected $fillable = [
        'member_id', 'fake_assistant_id', 'date', 'time', 'status',
        'name', 'phone', 'store_id',
    ];

    protected $casts = [
//        'date' => 'date',
        'status' => AssistantReserveStatus::class,
    ];

    public function assistant()
    {
        return $this->belongsTo(FakeAssistant::class, 'fake_assistant_id');
    }

    public function member()
    {
        return $this->belongsTo(Member::class, 'member_id');
    }

    public function store()
    {
        return $this->belongsTo(Store::class, 'store_id');
    }
}
